const app = {
  namespaced: true,
  state: {
    formSearchData: {},
  },
  mutations: {
    appSFormData(state, val) {
      state.formSearchData[val.key] = val.val;
    },
    clearSFormData(state, key) {
      delete state.formSearchData[key];
    },
  },
  actions: {
    incrementIfOddOnRootSum({ commit, rootState }) {
      console.log("rootState", rootState.app.count);
      commit("increment");
    },
    setFormSearchData({ commit }, val) {
      commit("appSFormData", val);
    },
    clearFormSearchData({ commit }, key) {
      commit("clearSFormData", key);
    },
  },
  getters: {},
};

export default app;
